<div class="row">
 <small>
 <div class="span3 bs-docs-sidebar ">
 	<*include file="<*$controller*>/location.tpl"*>
  </div>
 
  <div class="span4">
     <div class="clearfix span4" style="background-color:#f8f8f8; padding:10px; margin:10px 0px;"> 
		发新卡：<*$school.groupname*>&nbsp;&nbsp;<*$school.schoolname*>   
	 </div>	    
      <form action="/<*$controller*>/opsendit" method="post"   name="form1" class="form-horizontal">
      		<table class="table table-condensed table-bordered table-hover span9">
            	<tr><td>第一张卡卡号：</td><td><input  type="text" name="cid" id="cid"   placeholder="请输入第一张卡的卡号"  value="<*$cid*>"  class="span2" ></input></td></tr>
            	<tr><td>数量：</td><td><input  type="text" name="num" id="num"   placeholder="请输入新卡的数量"  value="<*$num*>"  class="span2" ></input></td></tr>
                <tr><td colspan="2" ><input type="submit" class="btn btn-success"  value="确定发卡"  ></td></tr>
          <input type="hidden" name="groupid" id="groupid"  value="<*$school.groupid*>"/> 
          <input type="hidden" name="schoolid" id="schoolid"  value="<*$school.schoolid*>"/> 
            </table>       
      </form>
    </div>
    </small> 
     
<!-- <script type="text/javascript" src="/js/prototype.js"></script>  -->
<script type="text/javascript"> 
  
  
 
       function   ajax_post(){ 
	    var groupsid="<*$groups*>"; 
        $.post("/<*$controller*>/groups/",{"jigouid":groupsid},function(data,statusText){ 
			 $("#jigou").append(data); 
        });  
	 } 
	  
	  $("#jigou").change(function(){
           // $("#city option:gt(0)").remove();  //清空所有城市的信息
            //$("#county option:gt(0)").remove();  //清空所有县级的信息
            var id = this.value;
			var schoolid="<*$schoolid*>";  
			  
            $.post("/<*$controller*>/schoollist/",{"id":id,"sid":schoolid},function(data,statusText){
                 $("#school").html('');
                 $("#school").append(data);
            
            });
        });
		
		$("#school").change(function(){
           // $("#city option:gt(0)").remove();  //清空所有城市的信息
            //$("#county option:gt(0)").remove();  //清空所有县级的信息
            var sid = this.value; 
            $.post("/<*$controller*>/classlist/",{"id":sid},function(data,statusText){
				 
                 $("#class1").html('');
                 $("#class1").append(data);
            
            });
        });
		
	
	 window.onload=function(){
	    ajax_post(); 
	 if( '<*$groups*>'+0 != 0 ){ 
	        
			var id = '<*$groups*>'; 
			var sid = '<*$schoolid*>';  
			 
			$.post("/<*$controller*>/schoollist/",{"id":id,"sid":sid},function(data,statusText){
				 $("#school").html('');
				 $("#school").append(data); 
				});
	    } 
          
	 if('<*$schoolid*>'+0 != 0){   
		   var id = '<*$schoolid*>'; 
		   var cid='<*$classid*>';
			$.post("/<*$controller*>/classlist/",{"id":id,"cid":cid},function(data,statusText){ 
				 $("#class1").html('');
				 $("#class1").append(data); 
				}); 
		   
	 }/* */

 } 
	
function sendit(sid){
   window.location='/<*$controller*>/sendit/schoolid/'+sid;   
}  		 
		
	  
</script>
  
 </div> 